package com.zjdiepu.www.manage.api.third;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import java.net.SocketTimeoutException;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.zjdiepu.www.base.BaseController;
import com.zjdiepu.www.base.core.ApiResponse;
import com.zjdiepu.www.base.enums.type.ResultFlagType;
import com.zjdiepu.www.base.lang.HttpClientException;
import com.zjdiepu.www.ibiz.third.IPhoneNumberAddrService;
import com.zjdiepu.www.model.dh.dto.DhOverdueTrailer;

@RestController
@RequestMapping(value= "IdCardNoInfoController", produces="application/json;charset=UTF-8")
@Api(tags = {"手机号码归属地查询"}, produces="application/json;charset=UTF-8")
public class IdCardNoInfoController extends BaseController{

	
	
	@Resource
	private IPhoneNumberAddrService iPhoneNubmerAddrService;
	
	@ApiOperation(value = "身份证信息查询",response = DhOverdueTrailer.class, httpMethod="POST", tags={"列表"})
	@RequestMapping(value = "getIdCordInfo", method = RequestMethod.POST)
	public ApiResponse getIdCordInfo(String idNo){
		
		Map<String,Object> map=null;
		try {
			map = iPhoneNubmerAddrService.getIdCordInfo(idNo);
			map.put("100100", ResultFlagType.SUCCESS.getValue());
		} catch (SocketTimeoutException | HttpClientException e) {
			e.printStackTrace();
		}
		
		return ApiResponse.success(map);
	}
}
